/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2025/4/24
 * Time: 22:55
 */

#ifndef OBJECTWORLD_H
#define OBJECTWORLD_H

#include "../affiliate/Collider.h"
#include "ObjectScreen.h"

class ObjectWorld : public ObjectScreen
{
public:
    void SetRenderPosition(const glm::vec2 & _render_position) override;
    void Update(float _dt) override;
    void Init() override;

    glm::vec2 GetPosition() const override { return position_; }

    void SetPosition(const glm::vec2 & _position);

    Collider * GetCollider() const { return collider_; }
    void       SetCollider(Collider * _collider) { collider_ = _collider; }

    virtual void TakeDamage(float _damage);

protected:
    glm::vec2  position_ {0, 0};// 世界位置
    Collider * collider_ {nullptr};
};

#endif//OBJECTWORLD_H
